package com.lan.tian;


import java.sql.Connection;
import java.sql.Driver;
import java.util.Properties;

/**
 * @author lovvyang
 * @date 2020/5/22-12:05
 */
/*
 * @PackageName:com.lan.tian
 * @ClassName:MySQLDemo
 * @Description
 * @author lovvyang
 * @date 2020/5/22/12:05
 **/

public class MySQLDemo {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Driver driver =new com.mysql.jdbc.Driver();
        String url ="jdbc:mysql://localhost:3306";
        Properties properties =new Properties();
        properties.put("user","root");
        properties.put("password","123456");
        Connection connect = driver.connect(url, properties);
        System.out.println(connect);
    }

    public void test(){

    }
}
